﻿@inherits Blazor.SysSystem

<Tabs Animated>
    <TabPane Tab="系统信息" Key="1">
        <Form Model="@Model" LabelColSpan="@labelCol" WrapperColSpan="@valueCol">
            <FormItem Label="企业名称">
                @($"{context.CompNo}-{context.CompName}")
            </FormItem>
            <FormItem Label="系统名称">
                <EditInput Value="@context.AppName" OnSave="OnSaveAppName" />
            </FormItem>
            <FormItem Label="系统版本">
                @Config.Version.AppVersion
            </FormItem>
            <FormItem Label="软件版本">
                @Config.Version.SoftVersion
            </FormItem>
            <FormItem Label="框架版本">
                @Config.Version.FrameVersion
            </FormItem>
            @if (!Config.App.IsPlatform && !string.IsNullOrWhiteSpace(Config.App.ProductId))
            {
                <FormItem Label="产品ID">
                    @Config.App.ProductId
                </FormItem>
                <FormItem Label="产品密钥">
                    <EditInput Value="@context.ProductKey" OnSave="OnSaveProductKey" />
                </FormItem>
            }
            <FormItem Label="版权信息">
                @context.Copyright
            </FormItem>
            <FormItem Label="软件许可">
                @context.SoftTerms
            </FormItem>
        </Form>
    </TabPane>
    <TabPane Tab="安全设置" Key="2">
        <Form Model="@Model" LabelColSpan="@labelCol" WrapperColSpan="@valueCol">
            <FormItem Label="默认密码">
                <EditInput Value="@context.UserDefaultPwd" OnSave="OnSaveDefaultPwd" />
            </FormItem>
        </Form>
    </TabPane>
</Tabs>

@code {
    private int labelCol = 4;
    private int valueCol = 10;
}